﻿<%template _header%>
<script type="text/javascript">
var postminchars = parseInt({config.minpostsize});
var postmaxchars = parseInt({config.maxpostsize});
var disablepostctrl = parseInt({disablepostctrl});
</script>

<div class="wrap cl forum">
    <%template _pagewordadlist%>
    <%template _forumhot%>
    <!--topic-->
    <div class="main cl" id="wp">
    <%set (int){lastforumlayer} = -1%>
    <%set (int){lastcolcount} = 1%>
    <%set (int){lastforumid} = 0%>
    <%set (int){subforumcount} = 0%>
    <%set (int){subcount} = 0%>
    <%loop (IndexPageForumInfo) forum forumlist%>
    <%if {forum.layer}==0%>
        <%set {subcount} = 0%>
	    <div class="mainbox list" style="float:left; width:500px">
		    <table cellspacing="0" cellpadding="0">
		    <%set {lastforumlayer}=0%>
		    <%set {lastcolcount}={forum.colcount}%>
		    <%set {lastforumid}={forum.fid}%>
		    <%else%>
		    <%set {subcount}={subcount}+1%>
	        <%csharp%>
	        if (maxsubcount > 0)
            {
                if (subcount > maxsubcount)
                    continue;
            }
            <%/csharp%>
		    <%if {forum.colcount}==1%>
		    <tbody id="forum{forum.fid}">
			    <tr>
				    <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({forum.lasttid},0)%>
				    <th <%if {config.Shownewposticon}==1 %>class="notopic<%if {forum.havenew}=="new" %> new<%/if%>"<%/if%>>
					    <h2>
					    <%if {forum.redirect}==""%>
						    <%set {aspxrewriteurl} = this.ShowForumAspxRewrite({forum.fid},0,{forum.rewritename})%>
						    <a href="{aspxrewriteurl}">
					    <%else%>
						    <a href="{forum.redirect}">
					    <%/if%>
                        <%if {forum.icon}!=""%>
                            <%set (string){fname} = Utils.RemoveHtml({forum.name})%>
					        <img src="{forum.icon}" border="0" hspace="5" alt="{fname}"/>
				        <%/if%>
					    {forum.name}</a><%if {forum.todayposts}>0%><em>(今日:<strong>{forum.todayposts}</strong>)</em><%/if%>
					    </h2>
					    <%if {forum.description}!=""%><p>{forum.description}</p><%/if%>
					    <%if {forum.moderators}!=""%><p class="xg2">版主: {forum.moderators}</p><%/if%>
				    </th>
				    <td class="nums"><em><%if {forum.istrade}!=1%>{forum.topics}<%else%>&nbsp;<%/if%></em> / <%if {forum.istrade}!=1%>{forum.posts}<%else%>&nbsp;<%/if%></td>
				    <td class="lastpost">
				    <%if {forum.istrade}!=1%>
				    <%if {forum.status}==-1%>
					    <p>私密版块</p>
				    <%else%>
					    <%if {forum.lasttid}!=0%>
					    <p>
					       <%set {aspxrewriteurl} = this.ShowTopicAspxRewrite({forum.lasttid},0)%>
						    <a href="{aspxrewriteurl}"><%getsubstring({forum.lasttitle,35,"..."})%></a>
					    </p>
					    <div class="topicbackwriter">by
						    <%if {forum.lastposter}!=""%>
							    <%if {forum.lastposterid}==-1%>
								    游客
							    <%else%>
							       <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({forum.lastposterid})%>
								    <a href="{aspxrewriteurl}">{forum.lastposter}</a>
							    <%/if%>
						    <%else%>
							    匿名
						    <%/if%>
						    <%set (string){lastpost}=ForumUtils.ConvertDateTime({forum.lastpost})%>						
						    - <a href="showtopic.aspx?topicid={forum.lasttid}&page=end#lastpost" title="{forum.lasttitle}"><em>{lastpost}</em></a>
					    </div>
					    <%else%>
						    <p>从未</p>
					    <%/if%>
				    <%/if%>
				    <%else%>
				       <p>{forum.description}</p>
				    <%/if%>
				    </td>
			    </tr>
		    </tbody>
	    <%else%>
	    <%set {subforumcount}={subforumcount}+1%>
	    <%set (double){colwidth} = 99.9 / {forum.colcount} %>
		    <%if {subforumcount}==1%>
		    <tbody>
		    <tr>
		    <%/if%>
			    <th style="width:{colwidth}%;" <%if {config.Shownewposticon}==1 %>class="notopic <%if {forum.havenew}=="new" %>new<%/if%>"<%/if%>>
				    <h2>				
				    <%if {forum.redirect}==""%>
				        <%set {aspxrewriteurl} = this.ShowForumAspxRewrite({forum.fid},0,{forum.rewritename})%>
					    <a href="{aspxrewriteurl}">
				    <%else%>
					    <a href="{forum.redirect}">
				    <%/if%>
				    <%if {forum.icon}!=""%>
                            <%set (string){fname} = Utils.RemoveHtml({forum.name})%>
					        <img src="{forum.icon}" border="0" align="left" hspace="5" alt="{fname}"/>
				    <%/if%>
                    {forum.name}</a>
				    <%if {forum.todayposts}>0%>
				    <em>(今日:<strong>{forum.todayposts}</strong>)</em>
				    <%/if%>
				    </h2>
				    <p><%if {forum.istrade}!=1%>主题:{forum.topics}, 帖数:{forum.posts}<%/if%></p>
				    <%if {forum.istrade}!=1%>
				    <%if {forum.status}==-1%>
				    <p>私密版块</p>
				    <%else%>
					    <%if {forum.lasttid}!=0%>
					    <%set (string){lastpost}=ForumUtils.ConvertDateTime({forum.lastpost})%>	
						    <p>最后: <a href="showtopic.aspx?topicid={forum.lasttid}&page=end#lastpost" title="{forum.lasttitle}"><em>{lastpost}</em></a> by 
							    <%if {forum.lastposter}!=""%>
								    <%if {forum.lastposterid}==-1%>
									    游客
								    <%else%>
								       <%set {aspxrewriteurl} = this.UserInfoAspxRewrite({forum.lastposterid})%>
									    <a href="{aspxrewriteurl}">{forum.lastposter}</a>
								    <%/if%>
							    <%else%>
								    匿名
							    <%/if%>
						    </p>
					    <%/if%>				
				    <%/if%>
				    <%else%>
				      <p>{forum.description}</p>
				    <%/if%>
			    </th>
    <%if {subforumcount}=={forum.colcount}%>
		    </tr>
		    </tbody>
	    <%set {subforumcount}=0%>
    <%/if%>
    <%/if%>
	    <%set {lastforumlayer}=1%>
	    <%set {lastcolcount}={forum.colcount}%>
    <%/if%>
    <%/loop%>
    <%if {lastcolcount}!=1 && {subforumcount}!=0%>
		    <%repeat("<td>&nbsp;</td>", {lastcolcount}-{subforumcount})%>
    <%/if%>
	    </table>
	    </div>
	
	    <div style="float:right; text-align:left">
                <h3>
                    大家都在搜
                </h3>
                <ul class="hot_words">
                    <li><a class="bg_blue2" href="http://wenwen.soso.com/z/search.e?sp=s%e6%88%91%e7%9a%84%e9%9d%92%e6%98%a5%e5%9c%a8%e5%bb%b6%e5%ae%89&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >我的青春在延安</a></li>
                    <li><a class="bg_blue5" href="http://wenwen.soso.com/z/search.e?sp=s%e5%9b%bd%e9%99%85%e5%81%a5%e7%be%8e%e5%a4%a7%e8%b5%9b&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >上海电影节</a></li>
                    <li><a class="bg_blue3" href="http://wenwen.soso.com/z/search.e?sp=sdnf%e5%81%9c%e6%9c%ba%e5%85%ac%e5%91%8a&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >dnf停机公告</a></li>
                    <li><a class="bg_blue2" href="http://wenwen.soso.com/z/search.e?sp=s%e8%9c%b1%e8%99%ab&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >蜱虫</a></li>
                    <li><a class="bg_blue1" href="http://wenwen.soso.com/z/search.e?sp=s%e6%94%af%e4%bb%98%e5%ae%9d&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >支付宝</a></li>
                    <li><a class="bg_blue1" href="http://wenwen.soso.com/z/search.e?sp=s%e9%ab%98%e8%80%83%e9%98%85%e5%8d%b7&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >高考阅卷</a></li>
                    <li><a class="bg_blue6" href="http://wenwen.soso.com/z/search.e?sp=s%e6%b5%b7%e5%b7%a1%e8%88%b9&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >海巡船</a></li>
                    <li><a class="bg_blue1" href="http://wenwen.soso.com/z/search.e?sp=s%e6%88%91%e8%a1%8c%e8%b4%bf%e4%ba%86&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >我行贿了</a></li>
                    <li><a class="bg_blue5" href="http://wenwen.soso.com/z/search.e?sp=s%e5%ae%ab2&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >宫2</a></li>
                    <li><a class="bg_blue3" href="http://wenwen.soso.com/z/search.e?sp=s90%e5%91%a8%e5%b9%b4%e7%ba%aa%e5%bf%b5%e5%b8%81&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >90周年纪念币</a></li>
                    <li><a class="bg_blue4" href="http://wenwen.soso.com/z/search.e?sp=s%e5%a7%9a%e6%98%8e%e4%b8%80%e4%bb%a3&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >姚明一代</a></li>
                    <li><a class="bg_blue4" href="http://wenwen.soso.com/z/search.e?sp=s3d%e7%89%88%e6%b3%b0%e5%9d%a6%e5%b0%bc%e5%85%8b&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >3d版泰坦尼克</a></li>
                    <li><a class="bg_blue6" href="http://wenwen.soso.com/z/search.e?sp=s%e6%b5%b7%e5%b7%a131&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >海巡31</a></li>
                    <li><a class="bg_blue7" href="http://wenwen.soso.com/z/search.e?sp=s%e7%ba%a2%e6%ad%8c&amp;pid=ww.home.keyword&amp;ch=ww.home.keyword"
                       >红歌</a></li></ul>
	    </div>
	    
	    <div style="clear:both"/>
    </div>
    <!--end topic-->
</div>
<%if {config.stylejump}==1%>
<%if {userid}!=-1 || {config.guestcachepagetimeout}<=0%>
	<div id="styleswitcherhome_menu" class="popupmenu_popup cl skin" style="display: none;">
		<ul>
		{templatelistboxoptionsforforumindex}
		</ul>
	</div>
<%/if%>
<%/if%>
<%if {config.forumjump}==1%>
	{navhomemenu}
<%/if%>
<%template _copyright%>
<%template _adlist%>
{mediaad}
{inforumad}
<%template _footer%>